<template>
	<view class="my_heard">
		<view :style="{height:screenWidth+'px'}" class="heard-image">
			<image :src="url.url" mode=""></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				screenWidth:0
			};
		},
		props:{
			url:{
				type:Object,
				default(){
					return{
						url:"https://img.alicdn.com/imgextra/i1/847355890/O1CN01wNgf1W1tNfWbLAiPA_!!847355890.jpg",
						
					}
				}
			}
		},
		created() {
			// 同步获取手机信息 , statusBarHeight 为导航栏的高度
			const info = uni.getSystemInfoSync();
			this.screenWidth = info.screenWidth
			// console.log(info);
		}
	}
</script>

<style scoped lang="scss">
.my_heard{
	width: 100%;
	height: 300px;
	overflow: hidden;
	.heard-image{
		width: 100%;
		image{
			width: 100%;
			height: 100%;
		}
	}
}
</style>
